[
    {
        "id": "0904",
        "name": "Create HTB with default setting",
        "category": [
            "qdisc",
            "htb"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$IP link add dev $DUMMY type dummy || /bin/true"
        ],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root htb",
        "expExitCode": "0",
        "verifyCmd": "$TC qdisc show dev $DUMMY",
        "matchPattern": "qdisc htb 1: root refcnt [0-9]+ r2q 10 default 0 direct_packets_stat.*direct_qlen",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root",
            "$IP link del dev $DUMMY type dummy"
        ]
    },
    {
        "id": "3906",
        "name": "Create HTB with default-N setting",
        "category": [
            "qdisc",
            "htb"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$IP link add dev $DUMMY type dummy || /bin/true"
        ],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root htb default 10",
        "expExitCode": "0",
        "verifyCmd": "$TC qdisc show dev $DUMMY",
        "matchPattern": "qdisc htb 1: root refcnt [0-9]+ r2q 10 default 0x10 direct_packets_stat.* direct_qlen",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root",
            "$IP link del dev $DUMMY type dummy"
        ]
    },
    {
        "id": "8492",
        "name": "Create HTB with r2q setting",
        "category": [
            "qdisc",
            "htb"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$IP link add dev $DUMMY type dummy || /bin/true"
        ],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root htb r2q 5",
        "expExitCode": "0",
        "verifyCmd": "$TC qdisc show dev $DUMMY",
        "matchPattern": "qdisc htb 1: root refcnt [0-9]+ r2q 5 default 0 direct_packets_stat.*direct_qlen",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root",
            "$IP link del dev $DUMMY type dummy"
        ]
    },
    {
        "id": "9502",
        "name": "Create HTB with direct_qlen setting",
        "category": [
            "qdisc",
            "htb"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$IP link add dev $DUMMY type dummy || /bin/true"
        ],
        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root htb direct_qlen 1024",
        "expExitCode": "0",
        "verifyCmd": "$TC qdisc show dev $DUMMY",
        "matchPattern": "qdisc htb 1: root refcnt [0-9]+ r2q 10 default 0 direct_packets_stat.*direct_qlen 1024",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root",
            "$IP link del dev $DUMMY type dummy"
        ]
    },
    {
        "id": "b924",
        "name": "Create HTB with class rate and burst setting",
        "category": [
            "qdisc",
            "htb"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$IP link add dev $DUMMY type dummy || /bin/true",
            "$TC qdisc add dev $DUMMY handle 1: root htb"
        ],
        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 htb rate 20kbit burst 1000",
        "expExitCode": "0",
        "verifyCmd": "$TC class show dev $DUMMY",
        "matchPattern": "class htb 1:1 root prio 0 rate 20Kbit ceil 20Kbit burst 1000b cburst 1600b",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root",
            "$IP link del dev $DUMMY type dummy"
        ]
    },
    {
        "id": "4359",
        "name": "Create HTB with class mpu setting",
        "category": [
            "qdisc",
            "htb"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$IP link add dev $DUMMY type dummy || /bin/true",
            "$TC qdisc add dev $DUMMY handle 1: root htb"
        ],
        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 htb rate 20Kbit mpu 64",
        "expExitCode": "0",
        "verifyCmd": "$TC class show dev $DUMMY",
        "matchPattern": "class htb 1:1 root prio 0 rate 20Kbit ceil 20Kbit burst 1600b cburst 1600b",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root",
            "$IP link del dev $DUMMY type dummy"
        ]
    },
    {
        "id": "9048",
        "name": "Create HTB with class prio setting",
        "category": [
            "qdisc",
            "htb"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$IP link add dev $DUMMY type dummy || /bin/true",
            "$TC qdisc add dev $DUMMY handle 1: root htb"
        ],
        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 htb rate 20Kbit prio 1",
        "expExitCode": "0",
        "verifyCmd": "$TC class show dev $DUMMY",
        "matchPattern": "class htb 1:1 root prio 1 rate 20Kbit ceil 20Kbit burst 1600b cburst 1600b",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root",
            "$IP link del dev $DUMMY type dummy"
        ]
    },
    {
        "id": "4994",
        "name": "Create HTB with class ceil setting",
        "category": [
            "qdisc",
            "htb"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$IP link add dev $DUMMY type dummy || /bin/true",
            "$TC qdisc add dev $DUMMY handle 1: root htb"
        ],
        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 htb rate 20Kbit ceil 10Kbit",
        "expExitCode": "0",
        "verifyCmd": "$TC class show dev $DUMMY",
        "matchPattern": "class htb 1:1 root prio 0 rate 20Kbit ceil 10Kbit burst 1600b cburst 1600b",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root",
            "$IP link del dev $DUMMY type dummy"
        ]
    },
    {
        "id": "9523",
        "name": "Create HTB with class cburst setting",
        "category": [
            "qdisc",
            "htb"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$IP link add dev $DUMMY type dummy || /bin/true",
            "$TC qdisc add dev $DUMMY handle 1: root htb"
        ],
        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 htb rate 20Kbit cburst 2000",
        "expExitCode": "0",
        "verifyCmd": "$TC class show dev $DUMMY",
        "matchPattern": "class htb 1:1 root prio 0 rate 20Kbit ceil 20Kbit burst 1600b cburst 2000b",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root",
            "$IP link del dev $DUMMY type dummy"
        ]
    },
    {
        "id": "5353",
        "name": "Create HTB with class mtu setting",
        "category": [
            "qdisc",
            "htb"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$IP link add dev $DUMMY type dummy || /bin/true",
            "$TC qdisc add dev $DUMMY handle 1: root htb"
        ],
        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 htb rate 20Kbit mtu 2048",
        "expExitCode": "0",
        "verifyCmd": "$TC class show dev $DUMMY",
        "matchPattern": "class htb 1:1 root prio 0 rate 20Kbit ceil 20Kbit burst 2Kb cburst 2Kb",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root",
            "$IP link del dev $DUMMY type dummy"
        ]
    },
    {
        "id": "346a",
        "name": "Create HTB with class quantum setting",
        "category": [
            "qdisc",
            "htb"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$IP link add dev $DUMMY type dummy || /bin/true",
            "$TC qdisc add dev $DUMMY handle 1: root htb"
        ],
        "cmdUnderTest": "$TC class add dev $DUMMY parent 1: classid 1:1 htb rate 20Kbit quantum 2048",
        "expExitCode": "0",
        "verifyCmd": "$TC class show dev $DUMMY",
        "matchPattern": "class htb 1:1 root prio 0 rate 20Kbit ceil 20Kbit burst 1600b cburst 1600b",
        "matchCount": "1",
        "teardown": [
            "$TC qdisc del dev $DUMMY handle 1: root",
            "$IP link del dev $DUMMY type dummy"
        ]
    },
    {
        "id": "303a",
        "name": "Delete HTB with handle",
        "category": [
            "qdisc",
            "htb"
        ],
        "plugins": {
            "requires": "nsPlugin"
        },
        "setup": [
            "$IP link add dev $DUMMY type dummy || /bin/true",
            "$TC qdisc add dev $DUMMY handle 1: root htb r2q 5"
        ],
        "cmdUnderTest": "$TC qdisc del dev $DUMMY handle 1: root",
        "expExitCode": "0",
        "verifyCmd": "$TC qdisc show dev $DUMMY",
        "matchPattern": "qdisc htb 1: root refcnt [0-9]+",
        "matchCount": "0",
        "teardown": [
            "$IP link del dev $DUMMY type dummy"
        ]
    }
]
